<?php
include('../conn.php');
include('../../tool/UpFileTool.class.php');
// 商家拒绝退货 
if (isset($_POST['shop_comment'])) {
  $shop_comment = $_POST['shop_comment'];
  $ordersid = $_POST['ordersid'];
  $state3 = 3;
  $datetime = date("Y-m-d H:i:s");

  if ($_FILES['shop_images']['name'][0] != '') {
    $UpFileTool=new UpFileTool('shop_images');
    $UpFileTool->multiImage($w=500, $h=500,$sumbimage='../sumbimage', $srcimage='../srcimage');
    $images=$UpFileTool->multiSumbImage;
    $srcimages=$UpFileTool->multiSrcImage;
    $sql = "UPDATE tuihuo set shop_comment='".$shop_comment."',shop_images='".$images."',shop_srcimages='".$srcimages."',state = ".$state3.",2time='".$datetime."' where ordersid=".$ordersid;
  }else{
    $sql = "UPDATE tuihuo set shop_comment='".$shop_comment."',state = ".$state3.",2time='".$datetime."' where ordersid=".$ordersid;
  }

  
  $query = mysql_query($sql);
  if($query){
       $arr = array('code' => 100, 'tip' =>'提交成功' );
       echo json_encode($arr);
  }else{
      $arr = array('code' => 300, 'tip' =>'提交失败' );
       echo json_encode($arr);
  }
}else{
   $arr = array('code' => 300, 'tip' =>'手机号码为空' );
   echo json_encode($arr);
}
// 商家拒绝退货 end
?>
